package zaphod.project1.editparts;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gef.DefaultEditDomain;
import org.eclipse.gef.GraphicalViewer;
import org.eclipse.gef.ui.parts.GraphicalEditor;

import zaphod.project1.model.internal.Item;

public class Project1Editor extends GraphicalEditor
{

    public Project1Editor()
    {
        setEditDomain( new DefaultEditDomain( this ) );
    }

    @Override
    protected void initializeGraphicalViewer()
    {
        GraphicalViewer viewer = getGraphicalViewer();
        viewer.setContents( new Item() );
    }

    @Override
    protected void configureGraphicalViewer()
    {
        super.configureGraphicalViewer();

        GraphicalViewer viewer = getGraphicalViewer();
        viewer.setEditPartFactory( new Project1EditPartFactory() );

    }

    @Override
    public void doSave( IProgressMonitor monitor )
    {
        // TODO Auto-generated method stub

    }

}
